package com.saver.view;

import com.saver.R;
import com.saver.core.persistence.CategoriaSQLite;
import com.saver.view.adapter.CategoriaListAdapter;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

public class CategoriaActivity extends Activity {

	private CategoriaSQLite categoriaSQLite;
	private CategoriaListAdapter categoriaListAdapter;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_categoria);
		categoriaSQLite = new CategoriaSQLite(this);
		
		categoriaListAdapter = new CategoriaListAdapter(this, categoriaSQLite.buscarTodo());
		
		ListView listView = (ListView) findViewById(R.id.listaCategoria);
		listView.setAdapter(categoriaListAdapter);
	}
	
}
